#!/usr/bin/python
# coding:utf-8

import redis

rds = redis.Redis(host='localhost', port=6379, decode_responses=True)


def test_redis():
    rds.set('name', 'junxi')  # key是"foo" value是"bar" 将键值对存入redis缓存
    # print(rds['name'])
    # print(rds.get('name'))  # 取出键name对应的值
    # print(type(rds.get('name')))
    # return rds.keys("*")
    return {'name': rds['name']}
    # return rds['name']
